Many areas of technology utilize processors that run computer code. Such computer codes may execute applications needed for operating various machines such as computers, appliances, vehicles, aircraft, and so on. These applications are often performance sensitive, that is, require efficiency and consistency of execution in order for users to benefit from using the applications. That is, the applications need the processor to perform its function based on specific requirements and within some tolerance level for fluctuations. For instance, the application may need the processor to complete its operation below a maximum allowed time threshold, and that the time duration fluctuate less than a maximum allowed variance. An automobile, for example, may require its components to react consistently and within a specific time frame when the driver makes sudden changes, such as, braking or steering. As another example, an aircraft may require its processors to perform a precise and quick calculation of the g-force exerted on the pilot, to protect the pilot from being exposed to a high g-force for an extended period of time.
When one or more processors execute program code, however, the characteristics of the execution may vary because of some factors. For example, the execution time for a task may vary based on the amount of processor resources that are used by other tasks that the same processor simultaneously performs. The resource usage may be affected by both internal and external factors. Internal factors may include an execution pattern of a program code, such as the amount of memory allocated to the program code. The user may be able to determine some of the internal factors before executing the code or to control some of the internal factors while executing the code. External factors, on the other hand, may include factors that the user cannot determine or control during execution. Some of the external factors, such as execution of branch prediction algorithms, may depend on the hardware. The external factors may thus result in outcomes that are unexpected by the user.
Therefore, execution of a program code may suffer from unpredictability and uncertainty. A user may not be able to expect consistency or predictability of performance among repeated executions of even the same program code on the same hardware. Moreover, a user may not be able to predict the performance of a program code on a new hardware system, even if the user measures the performance on a previous hardware system. For example, executing a program code on a new processor with twice the speed of a previous processor may not result in reducing the total execution time by half.
Such uncertainties and unpredictabilities may cause practical or financial hardships to users. For instance, in some performance sensitive applications, a user may err on the side of caution by using expensive hardware that has a much higher speed than the minimum required hardware for meeting the performance requirements. Alternatively, a user may not be able to predict the performance of the execution within some uncertainty limits. Adding predictability and certainty to the execution of a program code will reduce such hardships.